package org.jeecg.modules.device.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * @Description: 设备信息表
 * @Author: jeecg-boot
 * @Date:   2024-04-17
 * @Version: V1.0
 */
@Data
@TableName("iot_dev_device_info")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="iot_dev_device_info对象", description="设备信息表")
public class DevDeviceInfo implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "主键")
    private java.lang.String id;
	/**设备名称:*/
	@Excel(name = "设备名称:", width = 15)
    @ApiModelProperty(value = "设备名称:")
    private java.lang.String deviceName;
	/**设备编号*/
	@Excel(name = "设备编号", width = 15)
    @ApiModelProperty(value = "设备编号")
    private java.lang.String deviceCode;
	/**设备类型 1水表2压力表3阀门4/5视频 6水位7雨量8温度9湿度*/
	@Excel(name = "设备类型", width = 15, dicCode = "read_drive_type")
	@Dict(dicCode = "read_drive_type")
    @ApiModelProperty(value = "设备类型")
    private java.lang.String deviceType;
	/**所属水库*/
	@Excel(name = "所属水库", width = 15, dictTable = "iot_dev_reservoir_info", dicText = "name", dicCode = "id")
	@Dict(dictTable = "iot_dev_reservoir_info", dicText = "name", dicCode = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "所属水库")
    private java.lang.String reservoirId;

    /**所属监测点*/
    @Excel(name = "所属监测点", width = 15, dictTable = "iot_pipe_monitor_point", dicText = "name", dicCode = "id")
    @Dict(dictTable = "iot_pipe_monitor_point", dicText = "name", dicCode = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "监测点")
    private java.lang.Long pointId;
    // 产品id
    private java.lang.String productId;

    // 三方平台设备id 或 设备序列号
    private java.lang.String deviceId;
    // IMEI号,全局唯一
    private java.lang.String imei;

    /**数据驱动模型*/
    @Dict(dictTable = "iot_dev_drive_model", dicText = "drive_alias", dicCode = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "数据驱动模型")
    private java.lang.String driveId;
    //驱动模型类型1库表2http接口3sdk4接口直连
    private java.lang.Integer driveType;
	/**设备单位*/
	@Excel(name = "设备单位", width = 15)
    @ApiModelProperty(value = "设备单位")
    private java.lang.String deviceUnit;
	/**安装日期*/
	@Excel(name = "安装日期", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "安装日期")
    private java.util.Date installDate;
	/**安装人员*/
	@Excel(name = "安装人员", width = 15)
    @ApiModelProperty(value = "安装人员")
    private java.lang.String installer;
	/**质保期*/
	@Excel(name = "质保期", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "质保期")
    private java.util.Date warrantyPeriod;
	/**通道号*/
	@Excel(name = "通道号", width = 15)
    @ApiModelProperty(value = "通道号")
    private java.lang.String channelNumber;
	/**验证码*/
	@Excel(name = "验证码", width = 15)
    @ApiModelProperty(value = "验证码")
    private java.lang.String verificationCode;
	/**视频类型*/
	@Excel(name = "视频类型", width = 15, dicCode = "video_type")
	@Dict(dicCode = "video_type")
    @ApiModelProperty(value = "视频类型")
    private java.lang.String videoType;
	/**ip地址*/
	@Excel(name = "ip地址", width = 15)
    @ApiModelProperty(value = "ip地址")
    private java.lang.String ipAddr;
	/**端口号*/
	@Excel(name = "端口号", width = 15)
    @ApiModelProperty(value = "端口号")
    private java.lang.String port;

	/**在线状态*/
	@Excel(name = "状态", width = 15, dicCode = "device_status")
	@Dict(dicCode = "device_status")
    @ApiModelProperty(value = "状态")
    private java.lang.String status;
    /**激活使用状态*/
	@Excel(name = "激活使用状态", width = 15, dicCode = "device_status")
	@Dict(dicCode = "device_status")
    @ApiModelProperty(value = "激活使用状态")
    private java.lang.String deviceStatus;
    //经度
    private java.lang.String longitude;
    //纬度
    private java.lang.String latitude;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private java.lang.String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private java.util.Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private java.lang.String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private java.util.Date updateTime;
    /**设备最后更新时间*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "设备最后更新时间")
    private java.util.Date onlineAt;

    //gis显示状态
    private java.lang.Integer gisShow;
	/**描述*/
	@Excel(name = "描述", width = 15)
    @ApiModelProperty(value = "描述")
    private java.lang.String mark;
	/**删除标识*/
	@Excel(name = "删除标识", width = 15)
    @ApiModelProperty(value = "删除标识")
    @TableLogic
    private java.lang.Integer delFlag;
	/**租户*/
	@Excel(name = "租户", width = 15)
    @ApiModelProperty(value = "租户")
    private java.lang.String tenantId;


    //数据字段
    private transient String dataField;
    //指令类型open\close\read
    private transient String commandType;


}
